<!DOCTYPE html>
<html>
<!-- head -->
{include file="common/page/head"}
<link rel="stylesheet" href="__app__/admin/view/AssembleGoods/addGoods/addGoods.css" />
<body>
<!---------------- 添加商品 ------------------->
<!-- 页头 -->
{include file="common/page/header"}
<!-- jsfiles -->
{include file="common/page/jsfiles"}
<link href="__static__/js/umeditor/themes/default/css/umeditor.min.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="__static__/js/umeditor/third-party/template.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__static__/js/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__static__/js/umeditor/umeditor.min.js"></script>
<script type="text/javascript" src="__static__/js/umeditor/lang/zh-cn/zh-cn.js"></script>
<!-- 主体 -->
<div class="content container-fluid {if $leftBarScale eq '1'} scale {/if} ">
    <div class="row">
        <div class="col-md-2 left-section">
            <!-- 左导航菜单 -->
            {include file="common/page/menu"}
        </div>
        <div class="col-md-10 right-section">
            <!--内容区域-->
            <h3><i class="icon iconfont">{$Think.session.currentMenu.icon}</i>添加商品</h3>
            <div class="inner-section row">
                <div class="items add-div">
                    <form action="#" method="post" id="myForm"  enctype="multipart/form-data">
                        <table class="table table-striped table-hover table-bordered table-base">
                           <tr>
                                <td class="td1"><label>分类</label></td>
                                <td class="td2">
                                	<div class="category-list row">
                                	   {foreach name="cateList" item="cate"}
                                	   <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 category">{$cate.name}</div>
                                	   {/foreach}
                                	   <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 category"><a href="javascript:window.history.go(-1)">修改</a></div>
                                	</div>
                                </td>
                                <td class="td3"></td>
                            </tr>
							<tr>
                                <td class="td1"><label>多规格模板</label></td>
                                <td class="td2">
                                	<select class="form-control" name="tid" id="tid">
                                		<option value="">统一规格</option>
                                		{foreach name="templateList" item="template"}
                                		<option value="{$template.id}">{$template.name}</option>
                                		{/foreach}
                                	</select>
                                	<input type="hidden" name="standard" id="standard" value="0">
                                	<input type="hidden" name="propertyGroups" id="propertyGroups" value="">
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <tr class="property-tr hidden">
                                <td class="td1"><label>商品属性</label></td>
                                <td class="td2">
                                 	<div class="property-group-wrap">
                                 	</div>
	                                <div class="add-property-group-wrap">
	                                    <span class="property-group-action">
	                                    	<a class="btn btn-primary btn-sm property-group-add" href="javascript:;">添加</a>
	                                    </span>
	                                </div>
                                </td>
                                <td class="td3 property-info"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="name"><span class="must-tag">*</span>商品名称</label></td>
                                <td class="td2"><input type="text" id="name" name="name" placeholder="商品名称"></td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="imgurl"><span class="must-tag">*</span>主图上传</label></td>
                                <td class="td2"><input class="imgurl form-control" title="支持jpg、jpeg、gif、png格式，文件小于5M" tabindex="3" type="file"  accept="image/*" id="imgurl" name="imgurl" size="3"></td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label>辅图上传</label></td>
                                <td class="td2">
                                    <input class="side-image form-control" title="支持jpg、jpeg、gif、png格式，文件小于5M" type="file" name="sideImg[]">
                                    <input class="side-image form-control" title="支持jpg、jpeg、gif、png格式，文件小于5M" type="file" name="sideImg[]">
                                    <input class="side-image form-control" title="支持jpg、jpeg、gif、png格式，文件小于5M" type="file"  name="sideImg[]">
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="team_num"><span class="must-tag">*</span>拼团活动时间</label></td>
                                <td class="td2">
                                    <input id="start_time" name="start_time" type="text" class="input-normal search Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width:186px"/>
                                    -
                                    <input id="end_time" name="end_time" type="text" class="input-normal search Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width:186px"/>
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="team_num"><span class="must-tag">*</span>拼团人数</label></td>
                                <td class="td2"><input type="text" id="team_num" name="team_num" value="10" placeholder="拼团人数"></td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="name"><span class="must-tag">*</span>拼团价格</label></td>
                                <td class="td2"><input type="text" id="price" name="price" placeholder="拼团价格"></td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="ori_price"><span class="must-tag">*</span>商品原价</label></td>
                                <td class="td2">
                                    <input type="text" id="ori_price" name="ori_price" placeholder="商品原价">
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <!--没有为当前分类绑定模板时，则当前商品为统一规格-->
                            <tr>
                                <td class="td1"><label for="inventory"><span class="must-tag">*</span>商品库存</label></td>
                                <td class="td2">
                                	<!--0为统一规格-->
                                	<input type="text" id="inventory" name="inventory" placeholder="商品库存">
                                </td>
                                <td class="td3"></td>
                            </tr>        
                            <tr>
                                <td class="td1"><label for="simpledesc"><span class="must-tag">*</span>商品简述</label></td>
                                <td class="td2">
                                    <!-- umeditor -->
                                    <script type="text/plain" id="simpledesc" name="simple_desc" style="width:780px;height:200px;"></script>
                                    <script type="text/javascript">
                                        //实例化编辑器
                                        var um = UM.getEditor('simpledesc');
                                    </script>
                                    <!-- /umeditor -->
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label for="sortnum"><span class="must-tag">*</span>排序系数</label></td>
                                <td class="td2"><input type="text" id="sortnum" name="sort_num" value="5" placeholder="排序系数"></td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label><span class="must-tag">*</span>商品状态</label></td>
                                <td class="td2">
                                    <label><input type="radio" name="updown" value="1" checked>上架</label>&nbsp;&nbsp;&nbsp;
                                    <label> <input type="radio" name="updown" value="2">下架</label>
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td class="td1"><label><span class="must-tag">*</span>首页推荐</label></td>
                                <td class="td2">
                                    <label><input type="radio" name="recommend" value="0" checked>不推荐</label>&nbsp;&nbsp;&nbsp;
                                    <label><input type="radio" name="recommend" value="1">推荐</label>
                                </td>
                                <td class="td3"></td>
                            </tr>
                            <tr>
                                <td>
									<input type="hidden" name="cids" id="cids" class="cids" value="{$cids}">
                                </td>
                                <td><button type="button" class="btn btn-success btn-md" id='save'>提交</button></td>
                                <td></td>
                            </tr>
                        </table>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 页脚 -->
{include file="common/page/footer"}
<script src="__static__/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.form.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.js"></script>
<script type="text/javascript" src="__static__/js/form/jquery.validate.extend.js"></script>
<script type="text/javascript" src="__app__/admin/view/AssembleGoods/addGoods/addGoods.js"></script>
</body>
</html>